﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IHoliday" here, you must also update the reference to "IHoliday" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IHoliday
    {
        [OperationContract]
        int Holiday_Using(int HolidayID);

        [OperationContract]
        DataSet Holiday_GetAll();

        [OperationContract]
        HolidayInfo Holiday_GetInfo(int HolidayID);

        [OperationContract]
        DataSet Holiday_GetList(out int ItemCount, string keyWord, int currentPage, int pageSize,int year);

        [OperationContract]
        int Holiday_Insert(HolidayInfo eInfo);

        [OperationContract]
        bool Holiday_Update(HolidayInfo eInfo);

        [OperationContract]
        bool Holiday_Delete(int HolidayID);

        [OperationContract]
        bool Holiday_Exist(DateTime HolidayDate);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class HolidayInfo
    {
        
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }


        [DataMember]
        public string Note
        {
            get { return _Note; }
            set { _Note = value; }
        }
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        #region VARIABLES

        int _ID;
        string _Note;
        DateTime _Date;
        

        #endregion
    }

}
